package com.yuhs.zixing.study.design.pattern.dp002.structural.s004.composite.c003;

/**
 * @description:
 * @author: yuhs
 * @date: 2022/5/1 10:07 PM
 */
public abstract class Corp003 {
    //公司每个人都有名称
    private String name = "";
    //公司每个人都职位
    private String position = "";
    //公司每个人都有薪水
    private int salary = 0;

    public Corp003(String _name, String _position, int _salary) {
        this.name = _name;
        this.position = _position;
        this.salary = _salary;
    }

    //获得员工信息
    public String getInfo() {
        String info = "";
        info = "姓名：" + this.name;
        info = info + "\t职位：" + this.position;
        info = info + "\t薪水：" + this.salary;
        return info;
    }
}
